Active Record
https://gyazo.com/48e138ab658bac5175229c76448a8669
An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data.
P of EAA: Active Record
初出はMartin FowlerがP of EAA(2003)にパターンとして載せたこと
単なるリポジトリとして使うには便利。ここにはドメインロジックをかくとテストが面倒な気がするkadoyau.icon
#Design_pattern
https://youtu.be/rwu_CPT_6ek?t=6968
https://speakerdeck.com/yasaichi/directions-for-the-next-generation-of-ruby-on-rails-from-the-viewpoint-of-its-active-record?slide=27